<?php include('config.php')?>
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<?php
if($_POST['num_pumps']!=0 and $_POST['num_pumps']!=''){
?>

			<table border="0" width="100%" id="table5" cellpadding="0" bgcolor="#FDF9EE">
				<tr>
							<td width="125" bgcolor="#F7E6B7" align="center">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Type of Pump</font></td>
							<td align="center" width="41" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Pump Capacity(HP)</font></td>
							<td align="center" width="71" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Discharge M3/hr</font></td>
							<td align="center" width="71" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Head (m)</font></td>
							<td align="center" width="105" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">Depth of pump (m)</font></td>
							<td align="center" width="84" bgcolor="#F7E6B7">
							<font face="Verdana" style="font-size: 8.5pt" color="#990000">
							Depth of GW (m)</font></td>
							<td align="center" width="100" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							GW level fluctuation (m)</font></td>
							<td align="center" width="94" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Total production</font></td>
							<td align="center" width="70" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							No. of hrs. of operation</font></td>
							<td align="center" width="62" bgcolor="#F7E6B7">
							<font face="Verdana" style="font-size: 8.5pt" color="#990000">
							Elevation (m)</font></td>
							<td align="center" width="53" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							North</font></td>
							<td align="center" width="49" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							East </font></td>
							<td align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							status</font></td>
							<td width="92" height="32" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Current (amp)</font></td>
							<td width="98" height="32" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Voltage (volt)</font></td>
							<td height="32" width="97" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							PowerFactor</font></td>
							<td height="32" width="108" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Power (kw) actual </font></td>
							<td height="32" width="110" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Power (kw) design</font></td>
							<td height="32" width="104" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Difference </font></td>
							<td height="32" width="108" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							kw/h (unit)</font></td>
							<td height="32" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Rs.</font></td>
							<td height="32" align="center" width="119" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Annum </font></td>
			  </tr>
				<?php
				$no=$_POST['num_pumps'];
				if($no >0 ) {
				for($i=1; $i<=$no; $i++)
				{
				?>
				<tr align="center">
							<td width="125">
							<select size="1" name="type_pump<?php echo $i;?>" id="type_pump<?php echo $i;?>" class="txt5" >
                      		<option selected value="0">Select</option>
                     		 <?php 
								foreach($pump as $key=>$val)
								{
		   							echo "<option value=\"$val\">$val</option>";
								}
							?>
                  			</select></td>
							<td width="41"><input type="text" name="pump_cap<?php echo $i;?>" id="pump_cap<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="39"><input type="text" name="pump_discharge<?php echo $i;?>" id="pump_discharge<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="71"><input type="text" name="pump_head<?php echo $i;?>" id="pump_head<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="71"><input type="text" name="pump_depth<?php echo $i;?>" id="pump_depth<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="76"><input type="text" name="gw_depth<?php echo $i;?>" id="gw_depth<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="105"><input type="text" name="gw_level<?php echo $i;?>" id="gw_level<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="84"><input type="text" name="production<?php echo $i;?>" id="production<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="100"><input type="text" name="num_hrs<?php echo $i;?>" id="num_hrs<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="111"><input type="text" name="elevation<?php echo $i;?>" id="elevation<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="108"><input type="text" name="north<?php echo $i;?>" id="north<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="99"><input type="text" name="east<?php echo $i;?>" id="east<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="94">
							<select size="1" name="status_pump<?php echo $i;?>" id="status_pump<?php echo $i;?>" class="txt5" >
                      		<option selected value="0">Select</option>
                     		 <?php 
								foreach($status as $key=>$val)
								{
		   							echo "<option value=\"$val\">$val</option>";
								}
							?>
                  			</select></td>
							<td width="70"><input type="text" name="current<?php echo $i;?>" id="current<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="62"><input type="text" name="voltage<?php echo $i;?>" id="voltage<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="53"><input type="text" name="power_factor<?php echo $i;?>" id="power_factor<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="49"><input type="text" name="power_actual<?php echo $i;?>" id="power_actual<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="92"><input type="text" name="power_design<?php echo $i;?>" id="power_design<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="98"><input type="text" name="difference<?php echo $i;?>" id="difference<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="97"><input type="text" name="kw_unit<?php echo $i;?>" id="kw_unit<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="108"><input type="text" name="rs<?php echo $i;?>" id="rs<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
							<td width="110"><input type="text" name="annum<?php echo $i;?>" id="annum<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
			  </tr>
				<?php 
				}
				}
				?>
				<input type="hidden" name="count_pump" id="count_pump" value="<?php echo $no;?>"/>		
</table>
<?php }?>

<?php
if($_POST['num_reserv']!=0 and $_POST['num_reserv']!=''){
?>

			<table border="0" width="87%" id="table5" cellpadding="0" bgcolor="#FDF9EE">
				<tr>
							<td width="84" height="32" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Type of reservoir</font></td>
							<td height="32" width="84" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Status of reservoirs</font></td>
							<td height="32" width="71" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Storage capacity (KLD)</font></td>
							<td height="32" width="94" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							current total requirement (KLD) as per 40 lpcd</font></td>
							<td height="32" width="96" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Drinking demand (KLD) as per 10 lpcd</font></td>
							<td height="32" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Other demand (KLD) as per 30 lpcd</font></td>
							<td height="32" align="center" width="93" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Total projected demand (KLD) 40 lpcd</font></td>
							<td width="87" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Quantity lost by illegal connection (KL)</font></td>
							<td width="80" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Quantity lost by leakage &amp; wastage (KL)</font></td>
							<td width="75" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							UFW (KLD)</font></td>
							<td height="32" align="center" width="96" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">Remark</font></td>
							<!--<td align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							% illegal connection</font></td>
							<td align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							% leakage &amp; wastage</font></td>
							<td width="77" align="center" bgcolor="#F7E6B7">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							% UFW</font></td>-->
			  </tr>
				<?php
				$no=$_POST['num_reserv'];
				if($no >0 ) {
				for($i=1; $i<=$no; $i++)
				{
				?>
				<tr align="center">
							<td width="84">
							<select size="1" name="type_reserv<?php echo $i;?>" id="type_reserv<?php echo $i;?>" class="txt5" >
                      		<option selected value="0">Select</option>
                     		 <?php 
								foreach($reservior as $key=>$val)
								{
		   							echo "<option value=\"$val\">$val</option>";
								}
							?>
       			  </select></td>
							<td width="84">
							<select size="1" name="status_reserv<?php echo $i;?>" id="status_reserv<?php echo $i;?>" class="txt5" >
                      		<option selected value="0">Select</option>
                     		 <?php 
								foreach($status_reserv as $key=>$val)
								{
		   							echo "<option value=\"$val\">$val</option>";
								}
							?>
       			  </select></td>
				  <td width="71"><input type="text" name="storege_cap<?php echo $i;?>" id="storege_cap<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="94"><input type="text" name="requirement<?php echo $i;?>" id="requirement<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="96"><input type="text" name="drink_demand<?php echo $i;?>" id="drink_demand<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="93"><input type="text" name="other_demand<?php echo $i;?>" id="other_demand<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="93"><input type="text" name="total_demand<?php echo $i;?>" id="total_demand<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="87"><input type="text" name="lost_illegal<?php echo $i;?>" id="lost_illegal<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="80"><input type="text" name="lost_leakage<?php echo $i;?>" id="lost_leakage<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="75"><input type="text" name="ufw<?php echo $i;?>" id="ufw<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
				  <td width="96"><input type="text" name="remark<?php echo $i;?>" id="remark<?php echo $i;?>" size="20" class="txt5" onKeyUp="float(this)"></td>
			  </tr>
				<?php 
				}
				}
				?>
				<input type="hidden" name="count_reserv" id="count_reserv" value="<?php echo $no;?>"/>		
</table>
<?php }?>
			
